Skip to main content

js 获取原型的方法?

假设 Demo 是一个对象,那么有三种方式

1. Demo.constructor.prototype
2. Demo.__proto__
3. Object.getPrototypeOf(Demo)